<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>ES6 类</h1>
		<script type="module">
		import Student from './utils/Student.js'
		var s1 = new Student("小红",22,"javascript")
		var s2 = new Student("小张",25,"前端");
		console.log(s1,s2);
		// 使用继承的方法
		s2.say();
		// 使用自身的方法
		s2.study();
		// Person称为类
		/* import Person from './utils/Person.js'
		// p1，p2称为实例
		var p1 = new Person("小曾",6);
		var p2 = new Person("小刘",7);
		console.log(p1,p2);
		p1.say(); */
		
		console.log(typeof Student) 
		// function 类的本质是函数
		</script>
	</body>
</html>
